package com.cloudcc.mobile.bull.model.impl;

import com.cloudcc.mobile.basebean.BaseListEntity;
import com.cloudcc.mobile.bull.api.GongniuCheckHistoryNewApi;
import com.cloudcc.mobile.bull.bean.CheckinHistoryBean;
import com.cloudcc.mobile.bull.model.IGongniuCheckHistoryNewModel;
import com.cloudcc.mobile.util.ApiUtil;

import java.util.Map;

import rx.Observable;

/**
 * <pre>
 *     author : 92152
 *     e-mail : xxx@xx
 *     time   : 2019/09/12
 *     desc   :
 *     version: 1.0
 * </pre>
 */
public class GongniuCheckHistoryNewModel implements IGongniuCheckHistoryNewModel {
    private GongniuCheckHistoryNewApi api;

    //记录Log
//    private final Logger log = ProUtil.getLogger(LoginModel.class);

    public GongniuCheckHistoryNewApi ApiInstance() {
        if (api != null) {
            return api;
        } else {
            return ApiUtil.getInstance().createRetrofitApi(GongniuCheckHistoryNewApi.class);
        }
    }

    @Override
    public Observable<BaseListEntity<CheckinHistoryBean>> inquireGongniuCheckHistoryList(Map<String, String> praise) {
        api = ApiInstance();
        return api.inquireGongniuCheckHistoryList(praise);
    }
}
